package com.sgzn.sgpay.util;

public class StringUtil {

	public static boolean isEmpty(String str){
		if("".equals(str)|| str==null){
			return true;
		}else{
			return false;
		}
	}
	
	public static boolean isNotEmpty(String str){
		if(!"".equals(str)&&str!=null){
			return true;
		}else{
			return false;
		}
	}
	
	public static boolean existStrArr(String str,String []strArr){
		for(int i=0;i<strArr.length;i++){
			if(strArr[i].equals(str)){
				return true;
			}
		}
		return false;
	}

	public static String reverse(String str){
		return 	new StringBuffer(str).reverse().toString();
	}


	public static void main(String []args){

		String name = "M123";
		System.out.println(name.replaceFirst("M1","M"));
	}
}
